package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Destination;
import cn.wolfcode.wolf2w.domain.Travel;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * MongoDB持久层
 *
 */
public interface TravelRepository extends MongoRepository<Travel,String> {

    /**
     * 查询点击量前3的游记文章
     * @param destId
     * @param pageRequest
     * @return
     */
    List<Travel> queryByDestId(String destId, PageRequest pageRequest);
}
